Fix various GCC mis-configurations for newer versions. This patch goes through and enables C++11 and C++14 features for newer GCC's. The main changes are: 1. Turn on variable templates. (Uses __cpp_variable_templates) 2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501). 3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404) 4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255585 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/atomic b/include/atomic index b5d5a27..abec2a0 100644 --- a/include/atomic +++ b/include/atomic
@@ -552,6 +552,12 @@ namespace __gcc_atomic { template <typename _Tp> struct __gcc_atomic_t { + +#if _GNUC_VER >= 501 + static_assert(is_trivially_copyable<_Tp>::value, + "std::atomic<Tp> requires that 'Tp' be a trivially copyable type"); +#endif + _LIBCPP_INLINE_VISIBILITY #ifndef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS __gcc_atomic_t() _NOEXCEPT = default;